#import "FifteenPuzzleAppDelegate.h"
#import "FifteenPuzzleViewController.h"

@implementation FifteenPuzzleAppDelegate
@synthesize window;
@synthesize viewController;

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {    
    [viewController init];
    [window addSubview:viewController.view];
    [window makeKeyAndVisible];
    return YES;
}

-(void) moveTileWithIndex: (int)index {
    [viewController moveTileWithIndex:index];
}

-(void) moveTileOn: (int)position withDirection: (int)direction {
    [viewController moveTileOn:position withDirection:direction];
}

- (void)dealloc {
    [viewController release];
    [window release];
    [super dealloc];
}
@end
